export interface Options {
    rowKey?: string;
    columns: Column[],
    dataSource: Object[],
    rowHeight?: number; // 行高
    border?: null | {
        color?: string;
        width?: number;
    },
    cell?: Cell;
    scroll?: Scroll
    fontSize?: number,
    event?: Event,
}

export interface Event {
    onclick: Function,
}

export interface Cell {
    paddingLeft?: number;
    paddingRight?: number;
    paddingTop?: number;
    paddingBottom?: number
}

export interface Column {
    title: string;
    dataindex: string | string[];
    width?: number;
    minWidth?: number;
    // 自定义数据转换
    customRander?: (value: unknown, column: Column, record: Object) => string | { text: string, style: Object }[];
}

export interface Scroll {
    width?: number;
    borderColor?: string;
    backgroundColor?: string;
    thumbBorderColor?: string;
    thumbBackgroundColor?: string;
    scrollTop?: number;
}

export enum DEFAULT {
    CANVAS_WIDTH = 100,
    CANVAS_HEIGHT = 100,
    CANVAS_BACKGOUND_COLOR = '#F8F8F8',

    SCORLL_WIDTH = 6,
    SCORLL_BORDER_COLOR = '#333',
    SCORLL_BACKGROUND_COLOR = '#ccc',
    SCORLL_THUMB_BORDER_COLOR = '#000',
    SCORLL_THUMB_BACKGROUND_COLOR = '#666',

    CELL_PADDING_LEFT = 3,
    CELL_PADDING_RIGHT = 3,
    CELL_PADDING_TOP = 3,
    CELL_PADDING_BOTTOM = 3,
}